package com.shining.controller;

import com.shining.domain.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by meen on 2017/7/4.
 */
@RestController
@RequestMapping("/userInfo")
public class UserInfoController {

    @RequestMapping("/user.do")
    public User user() {
        return new User("001", "fangming");
    }


    @RequestMapping("/list.do")
    public List<User> userList() {
        List<User> userList = new ArrayList<User>();
        userList.add(new User("001", "fangming"));
        userList.add(new User("002", "yuebo"));
        userList.add(new User("003", "haokaopu"));
        userList.add(new User("004", "peipei"));
        userList.add(new User("005", "abcsd"));
        userList.add(new User("006", "bgfgggd"));
        return userList;
    }
}
